<template>
	<view class="container">
		<view class="title">{{title}}</view>
		<mp-html :content="content"></mp-html>
	</view>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import { dealHtml } from '@/hooks/useFunction'
import{onLoad} from '@dcloudio/uni-app'
import api from '@/api';
onLoad( async (e)=>{
	title.value = e.title
	const res : any = await api({
		method: 'get',
		prefix: 'acc',
		url: `/app_common_contents/v2/list`
	});
	res.data.shoppingDisplayPics.forEach(item=>{
		if(item.id == e.id){
			content.value = dealHtml(item.content)
			return 
		}
	})
	
	
})
const title = ref('')
const content = ref('')
</script>

<style lang="scss" scoped>
.container{
	line-height: 1;
	padding: 32rpx;
	box-sizing: border-box;
	background-color: #fff;
	.title{
		font-size: 32rpx;
		margin-bottom: 64rpx;
		text-align: center;
		color: #1a1a1a;
		font-weight: bold;
	}
	.content{
		line-height: 40rpx;
	}
}
</style>
